package com.snails.app.base.mvp.presenter;

import com.snails.app.base.mvp.BaseAbstract;
import com.snails.app.base.mvp.model.AbstractModel;
import com.snails.app.base.mvp.view.AbstractView;

/**
 * mvp-presenter, 持有V和M层
 *
 * @author lawrence
 * @date 2019-04-26 16:19
 */
public interface AbstractPresenter<V extends AbstractView, M extends AbstractModel>
        extends BaseAbstract {

    /**
     * 构造M层
     */
    M newModel();

    /**
     * 注入V层
     */
    void onAttachV(V view);

    /**
     * 回收View, Model层资源释放
     */
    void onDetachV();

}
